package com.foo.wechat.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foo.wechat.mapper.WxBannerMapper;
import com.foo.wechat.domain.WxBanner;
import com.foo.wechat.service.IWxBannerService;
import com.foo.common.core.text.Convert;

/**
 * 首页轮播Service业务层处理
 * 
 * @author foo
 * @date 2025-11-13
 */
@Service
public class WxBannerServiceImpl implements IWxBannerService 
{
    @Autowired
    private WxBannerMapper wxBannerMapper;

    /**
     * 查询首页轮播
     * 
     * @param bannerId 首页轮播ID
     * @return 首页轮播
     */
    @Override
    public WxBanner selectWxBannerById(Long bannerId)
    {
        return wxBannerMapper.selectWxBannerById(bannerId);
    }

    /**
     * 查询首页轮播列表
     * 
     * @param wxBanner 首页轮播
     * @return 首页轮播
     */
    @Override
    public List<WxBanner> selectWxBannerList(WxBanner wxBanner)
    {
        return wxBannerMapper.selectWxBannerList(wxBanner);
    }

    /**
     * 新增首页轮播
     * 
     * @param wxBanner 首页轮播
     * @return 结果
     */
    @Override
    public int insertWxBanner(WxBanner wxBanner)
    {
        return wxBannerMapper.insertWxBanner(wxBanner);
    }

    /**
     * 修改首页轮播
     * 
     * @param wxBanner 首页轮播
     * @return 结果
     */
    @Override
    public int updateWxBanner(WxBanner wxBanner)
    {
        return wxBannerMapper.updateWxBanner(wxBanner);
    }

    /**
     * 删除首页轮播对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWxBannerByIds(String ids)
    {
        return wxBannerMapper.deleteWxBannerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除首页轮播信息
     * 
     * @param bannerId 首页轮播ID
     * @return 结果
     */
    @Override
    public int deleteWxBannerById(Long bannerId)
    {
        return wxBannerMapper.deleteWxBannerById(bannerId);
    }
}
